function move(ele,data,cb){
    clearInterval(ele.timeId);
    ele.timeId = setInterval(()=>{
        var flag = true;
        for(var i in data){
            var now = (i==="opacity") ? getStyle(ele,i)*100 : parseInt(getStyle(ele,i));
            var speed = (data[i]-now)/5;
            speed = (speed>0) ? Math.ceil(speed) : Math.floor(speed);
            ele.style[i] = (i==="opacity") ? (now+speed)/100 : now+speed+"px";
            if(now !== data[i]){
                flag = false;
            }
        }
        if(flag){
            clearInterval(ele.timeId);
            cb && cb();
        }
    },30)
}


function getStyle(ele,attr){
    if(ele.currentStyle){
        return ele.currentStyle[attr];
    }else{
        return getComputedStyle(ele,false)[attr];
    }
} 